package controller

import "github.com/gin-gonic/gin"

type User struct {
	Name     string
	Password string
	Phone    string
}

func Register(ctx *gin.Context) {
	name := ctx.PostForm("name")
	password := ctx.PostForm("password")
	phone := ctx.PostForm("phone")
	user := User{
		Name:     name,
		Password: password,
		Phone:    phone,
	}
	ctx.JSON(200, gin.H{
		"msg":  "Register Success",
		"user": user,
	})
}
